ISLAMABAD , Pakistan -LRB- CNN -RRB- -- Hundreds of militants , believed to be foreign fighters , launched attacks on various military check posts in Pakistan 's border with Afghanistan Saturday night and early Sunday morning , military officials said .

A Pakistan soldier on patrol last fall against militants on the border of the Mohmand agency district .

The ensuing fighting left 40 militants and six Pakistan soldiers dead , said military spokesman Gen. Athar Abbas .

`` This is one of the largest attacks we have seen , '' Abbas said .

The attacks occurred at checkposts and military camps in the Mohmand agency , part of the lawless Federally Administered Tribal Areas where U.S. and Pakistani officials have reported a presence of militants .

Abbas said the fighters crossed into Pakistan from Afghanistan , and used rocket launchers and machine guns in their attacks . They have since been repelled , he said .

Pakistan and Afghanistan share a porous 1,500-mile border .

In recent months , Afghan officials have blamed militants operating from havens in the lawless tribal regions of Pakistan of sneaking into their country and attacking security personnel .

Pakistan has repeatedly denied involvement and bristled at the accusation , saying that Afghan lawmakers were making allegations without proof .

Abbas ' Sunday comments reverse those allegations , with Pakistan now blaming militants from Afghanistan attacking inside its soil .

@highlight

Attacks occurred at checkposts and military camps in the Mohmand agency

@highlight

40 militants , six Pakistani soldiers killed in fighting , Pakistan says

@highlight

Militants crossed into Pakistan from Afghanistan , official says